M=require("ming_node");
staticPath1="D:/G/gitee/ming_api_mock_plugins/node_oss_upload/src/images/"



fileList=[
    'https://cdn.nlark.com/yuque/0/2020/png/278997/1595127558724-b5cd8627-0e4d-4a52-beed-a97d27e838cc.png',
    'https://cdn.nlark.com/yuque/0/2020/png/278997/1605355138423-0bf0e614-8ee5-4387-83cc-05a999e273cb.png'
  ]

if(0){
    M.download("https://cdn.nlark.com/yuque/0/2020/png/278997/1591515706715-62d3b6f6-f113-497f-a532-63792180cd09.png",staticPath1,()=>{
        console.log("ok")
    })
}

if(1){
    let i=1;
    console.log("total:"+fileList.length)
    fileList.forEach(u=>{
        //u='https://cdn.nlark.com/yuque/0/2019/png/278997/1553342010621-c9e80620-7f18-44df-ab0a-4878ac7b33aa.png';
        M.download( u,staticPath1+u.substr(u.lastIndexOf("/")+1),()=>{
            console.log(i++)
        })
    })
}

